#include<stdio.h>
//如何给函数传递标志位
#define ONE 0001
#define TWO 0002
#define THREE 0004

void func(int flags)
{
   if(flags & ONE) printf("flags has ONE!\n ");
   if(flags & TWO) printf("flags has TWO!\n ");
   if(flags & THREE) printf("flags has THREE!\n ");
}



int main()
{
  func(ONE);
  func(THREE);
  func(ONE | TWO);
  func(ONE | TWO | THREE);
  return 0;
}
